<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/public/default.xhtml">
   
   	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{appliedBulletinController.firstResult}"></f:viewParam>
	   	<f:viewParam name="title" value="#{appliedBulletinController.parameterValues['title']}"></f:viewParam>
	   	<f:viewParam name="chooseType" value="#{appliedBulletinController.chooseType}" ></f:viewParam>		
		<f:viewParam name="qClassId" value="#{qualificationConditionBean.qualificationClassId}"></f:viewParam>
		<f:viewParam name="sectorId" value="#{qualificationConditionBean.sectorId}"></f:viewParam>
		<f:viewParam name="region" value="#{appliedBulletinController.parameterValues['region']}"></f:viewParam>	
   	</f:metadata>
   
   	<ui:define name="content">
   
   		<h:form>
		<p:messages />
		
		<div class="sub_wrap">
			<div class="Methbox_tit">
				<h2>#{appliedBulletinController.chooseType.typeName}</h2>
			</div>

			<!--从这儿引用zhongjieminglu.css-->
			<div class="zjname-list">
				<h:inputHidden value="#{appliedBulletinController.chooseType}" />
				<h:panelGrid columns="2">
					<p:outputLabel value="公告标题："></p:outputLabel>
					<p:inputText value="#{appliedBulletinController.parameterValues['title']}" style="width: 500px;"></p:inputText>
					
					<p:outputLabel value="资质范围："></p:outputLabel>
					<p:outputPanel>
						<p:selectOneMenu
							value="#{qualificationConditionBean.qualificationClassId}"
						>
							<f:selectItem
								itemLabel="--请选择--"
								itemValue="#{null}"
							/>
							<f:selectItems
								value="#{qualificationClassList.resultList}"
								var="_class"
								itemLabel="#{_class.name}"
								itemValue="#{_class.id}"
							></f:selectItems>
							<f:ajax render="sectorId"></f:ajax>
						</p:selectOneMenu>#{' '}					
						<p:selectOneMenu
							id="sectorId"
							widgetVar="sectorId"
							value="#{qualificationConditionBean.sectorId}"
						>
							<f:selectItem
								itemLabel="--请选择--"
								itemValue="#{null}"
							/>
							<f:selectItems
								value="#{qualificationConditionBean.sectors}"
								var="_sector"
								itemLabel="#{_sector.sectorName}"
								itemValue="#{_sector.id}"
							></f:selectItems>
						</p:selectOneMenu>
					</p:outputPanel>
				</h:panelGrid>
				<div class="actionButtons">
					<p:commandButton value="查询" ajax="false" action="BulletinList.xhtml?faces-redirect=true&amp;includeViewParams=true&amp;firstResult=0" />
				</div>			
			</div>
			<div class="clearbt"></div>
		
			<br/>
		
			<p:panel id="searchResult" header="公告管理">
				<p:dataTable value="#{appliedBulletinController.resultList}" var="_bulletin">
					
					<p:column>
						<f:facet name="header">项目名称</f:facet>
						#{_bulletin.projectName}
					</p:column>
					
					<p:column width="80">
						<f:facet name="header">选取方式</f:facet>
						#{_bulletin.wayOfChoose.typeName}
					</p:column>
					
					<p:column>
						<f:facet name="header">采购人</f:facet>
						#{_bulletin.buyer.cnname}
					</p:column>
					
					<p:column width="130">
						<f:facet name="header">报名截止时间</f:facet>
						<h:outputText value="#{_bulletin.endingApplyTime}"  >
							<f:convertDateTime pattern="yyyy-MM-dd HH:mm"/>
						</h:outputText>
					</p:column>
					
					<p:column width="80">
						<f:facet name="header">状态</f:facet>
						<h:outputText value="#{_bulletin.auditResult}" >
							<f:converter converterId="booleanConverter"></f:converter>
						</h:outputText>
					</p:column>
					
					<p:column styleClass="actionColumn">
						<f:facet name="header">操作</f:facet>
						<p:button outcome="BulletinArticleView.xhtml" value="查看">
							<f:param name="bulletinId" value="#{_bulletin.id}"></f:param>
						</p:button>
					</p:column>
				</p:dataTable>
			</p:panel>
			
			<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{appliedBulletinController}" />
			</ui:include>
			
		</div>
		</h:form>
      
   	</ui:define>
</ui:composition>
